<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@ include file="/public/pathvariable.jsp" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache"> 
		<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"> 
		<meta http-equiv="expires" content="0">
		<title>组织管理</title>
		<link rel="stylesheet" href="<%=basePath %>css/style.css">
		<link rel="stylesheet" href="<%=basePath %>css/ui_base.css">
		<link rel="stylesheet" href="<%=basePath %>css/d_msg.css">
		<link rel="stylesheet" href="<%=basePath %>css/public.css">
		<style>
			.ktab {
			    table-layout:fixed;/* 只有定义了表格的布局算法为fixed，下面td的定义才能起作用。 */
			}
			.ktab td{
				width:100%;
				padding:5px 5px !important;
			    word-break:keep-all;/* 不换行 */
			    white-space:nowrap;/* 不换行 */
			    overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
			    text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ；需与overflow:hidden;一起使用。*/
			}
			.files {
				position: relative;
			}
			
			.orgdefined-file {
				position: absolute;
				top: 0px;
				left: 0px;
				z-index: 2;
				width: 300px;
				font-size: 0;
				height:26px;
				line-height:26px;
				/*应对子元素为 inline-block 引起的外边距*/
			}
			.orgdefined-file input[type="text"] {
				display: inline-block;
				vertical-align: middle;
				width: 192px;
				box-sizing: border-box;
				border: 1px solid #ccc;
				font-size: 14px;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				height:28px;
				line-height:28px;
			}
			.orgdefined-file button {
				display: inline-block;
				vertical-align: middle;
				width: 60px;
				text-align: center;
				height:28px;
				line-height:28px;
				font-size: 14px;
				background-color: #1cb99a;
				border: none;
				color: #fff;
				z-index:100;
			}
			.files input[type="file"] {
				position: relative;
				top: 0px;
				left: 0px;
				z-index: 3;
				opacity: 0;
				cursor: pointer;
			}

		</style>
	</head>

	<body>
		<!--抬头bar-->
		<jsp:include page="/public/header.jsp" />
		<div class="main w clearfix"> 
			<div class="posr2">
				<div class="path_">
					<a href="<%=basePath %>index.jsp?parId=0">首页</a> >
					<a href="<%=basePath %>clients/index.jsp?parId=5">客户管理</a> >
					<a href="<%=basePath %>clients/organization.jsp?parId=501">组织管理</a>
				</div>
				<div class="key">
					<div class="key_">
						<div class="k_name fl">组织名称&nbsp;
							<input type="text" class="ui_text w240 enterSearch" id="orgNameSearch">
						</div>
						<div class="k_name fl">组织简称&nbsp;
							<input type="text" class="ui_text w240 enterSearch" id="orgShortSearch">
						</div>
						<div class="k_btn fl">
							<a href="javascript:void(0)" class="ui_btn yellow enterSearch" id="selectAll">查询</a>&nbsp;&nbsp;<span class="ui_btn green" id="k_add">新增</span>
						</div>
					</div>
					<div class="key_table">
						<div class="title">组织信息列表</div>
						<table width="100%" border="0" cellspacing="1" cellpadding="0" class="ktab">
						</table>
					</div>
				</div>
			</div>
		</div>
		
		<!--点击新增浮层-->
		<div class="key_layer">
			<i class="closeBtn"></i>
			<div class="tit">
				组织管理新增
			</div>
			<div class="layerfrom formular validationEngineContainer" id="addParameterArea">
				<fieldset>
				
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="lftab">
						<tr>
							<td class="name">组织名称</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="orgNameText" data-validation-engine="validate[required,maxSize[100]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">组织简称</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="orgShortText" data-validation-engine="validate[required,maxSize[50]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">可拥有栏目数</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="hasIfmCount" data-validation-engine="validate[required,custom[integer],min[1]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">可拥有用户数</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="hasUserCount" data-validation-engine="validate[required,custom[integer],min[1]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">组织描述</td>
							<td>
								<div contenteditable="true" class="ui_text w240 clearFormDiv" style="position:relative;height:auto;min-height:26px;" id="orgDesc"></div>
							</td>
						</tr>
						<tr>
							<td class="name">组织图片</td>
							<td>
								<div class="files">
									<div class="orgdefined-file">
										<input type="text" name="orgImageAddText" id="orgImageAddText" class="ui_text w240 clearFormInput">
										<button type="button">浏览</button>
									</div>
									<input type="file" name="a_file" id="a_file" class="ui_text w240 clearFormInput">
								</div>
							</td>
						</tr>
						
						
					</table>
				</fieldset>
			</div>
			<div class="kl_submit">
				<span class="ui_btn yellow" id="addParameterBtn">保存</span>
				<span class="ui_btn cancelLayer">关闭</span>
			</div>
		</div>
		<!--点击修改浮层-->
		<div class="key_layerEdit">
			<i class="closeBtn"></i>
			<div class="tit">
				组织管理编辑
			</div>
			<input type="hidden" id="adminUpdateId">
			<div class="layerfrom formular validationEngineContainer" id="editParameterArea">
				<fieldset>
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="lftab">
						<tr>
							<td class="name">组织名称</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="orgNameEditText" data-validation-engine="validate[required,maxSize[100]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">组织简称</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="orgShortEditText" data-validation-engine="validate[required,maxSize[50]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">组织图片</td>
							<td>
								<input type="hidden" class="clearFormInput" id="orgImageTextHidden"/>
								<div class="files">
									<div class="orgdefined-file">
										<input type="text" name="orgImageEditText" id="orgImageEditText" class="ui_text w240 clearFormInput" >
										<button type="button">浏览</button>
									</div>
									<input type="file" name="e_file" id="e_file" class="ui_text w240 clearFormInput">
								</div>
							</td>

						</tr>
						<tr>
							<td class="name">可拥有栏目数</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="hasIfmCountEdit" data-validation-engine="validate[required,custom[integer],min[1]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">可拥有用户数</td>
							<td>
								<input type="text" class="ui_text w240 clearFormInput" id="hasUserCountEdit" data-validation-engine="validate[required,custom[integer],min[1]]" data-prompt-position="centerRight" data-errormessage-value-missing=" * 不能为空！" />
							</td>
						</tr>
						<tr>
							<td class="name">组织描述</td>
							<td>
								<div contenteditable="true" class="ui_text w240 clearFormInput" id="orgEditDesc"  style="position:relative;height:auto;min-height:26px;" data-prompt-position="centerRight"></div>
							</td>
						</tr>
					</table>
				</fieldset>
			</div>
			<div class="kl_submit">
				<span class="ui_btn yellow" id="updateParameterBtn">保存</span>
				<span class="ui_btn cancelLayer">关闭</span>
			</div>
		</div>
	
		<script src="<%=basePath %>js/jquery.min.1.8.2.js"></script>
		<script src="<%=basePath %>js/layer/layer.min.js"></script>
		<script src="<%=basePath %>js/config.js"></script>
		<script src="<%=basePath %>js/userSession.js"></script>
		<script src="<%=basePath %>js/f_paging2.js"></script>
		<!--表单验证插件引入-->
		<link rel="stylesheet" href="<%=basePath %>js/Validation/css/validationEngine.jquery.css">
		<script src="<%=basePath %>js/Validation/js/jquery.validationEngine-zh_CN.js"></script>
		<script src="<%=basePath %>js/Validation/js/jquery.validationEngine.js"></script>
		<script src="<%=basePath %>clients/js/organization.js"></script>
		<!--<script src="<%=basePath %>js/f_paging.js"></script>-->
		<script>
			window.onload = function() {
 				document.getElementById("a_file").onchange = function() {
					document.getElementById("orgImageAddText").value = document.getElementById("a_file").value;
				}
				document.getElementById("e_file").onchange = function() {
					document.getElementById("orgImageEditText").value = document.getElementById("e_file").value;
				}
			};
		</script>
	</body>
</html>